﻿<UserControl x:Class="LiveTiss.Guias.UserControls.TempoEvolucaoDoenca"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d"
    xmlns:guia="clr-namespace:LiveTiss.Guias"
    xmlns:uc="clr-namespace:LiveTiss.Guias.UserControls"
    xmlns:converter="clr-namespace:LiveTiss.Classes.TypeConverter"
    x:Name="ucTempo">
    
    <UserControl.Resources>
        <converter:EnumConverter x:Key="enumConverter"  />
    </UserControl.Resources>
    
    <StackPanel Width="890">
        <Grid Height="53" Margin="0,0,6,0">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="0.024*"/>
                <ColumnDefinition Width="0.976*"/>
            </Grid.ColumnDefinitions>
            <StackPanel Grid.ColumnSpan="2" Margin="0" Grid.Row="2" Grid.Column="2">
                <TextBlock TextWrapping="Wrap" Text="Tempo de Doença:" FontFamily="Segoe UI" FontSize="13.333"/>
                <StackPanel Orientation="Horizontal" HorizontalAlignment="Left" Margin="0,6,0,0">
                    <TextBox Text="{Binding Path=Value.valor, ElementName=ucTempo, ValidatesOnDataErrors=True, NotifyOnValidationError=True, Mode=TwoWay}" Width="57" />
                    <ComboBox Name="cbxTipoTempoDoenca" Width="120" Margin="20,0,0,0" SelectedValue="Key" DisplayMemberPath="Value" 
                              ItemsSource="{Binding Path=Value.UnidadeTempoItems, ElementName=ucTempo, Mode=OneWay}"
                              SelectedIndex="{Binding Path=Value.unidadeTempo,ElementName=ucTempo, Converter={StaticResource enumConverter}, ConverterParameter='UnidadeTempo', ValidatesOnDataErrors=True, NotifyOnValidationError=True, Mode=TwoWay}"/>
                </StackPanel>
            </StackPanel>
            <TextBlock TextWrapping="Wrap" Text="*" FontFamily="Segoe UI" FontWeight="Bold" FontSize="21.333" Foreground="#FF307852" Height="16" VerticalAlignment="Top" Margin="0,0,3,0" d:LayoutOverrides="Width"/>
        </Grid>
    </StackPanel>
</UserControl>
